function createTable(tx) {
    /**消费记录表 */
    tx.executeSql(
        'CREATE TABLE IF NOT EXISTS t_consumption_record ' +
        '(id,appointment_id,shop_id,product_name,product_id,product_type,product_count,customer_shop_id,' +
        'package_id,package_item_id,original_price,actual_discount_rate,actual_price,payment_record_id,' +
        'appointed_dresser_id,actual_dresser_id,appointed_assist_id,assist_dresser_id,' +
        'appointed_other_id,other_dresser_id,short_stay_status,consume_time,update_time,' +
        'del_status)'
    );
    /**会员卡充值记录表 */
    tx.executeSql(
        'CREATE TABLE IF NOT EXISTS t_card_recharge_record ' +
        '(id,shop_id,card_id,customer_shop_id,package_id,recharge_type,recharge_amount,extra_amount,' +
        'actual_price,payment_record_id,credit_record_id,achieve_dresser_id,recharge_time,update_time,' +
        'del_status)'
    );
    /**付款记录表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_payment_record ' +
        '(id,card_id,shop_id,customer_shop_id,payment_value,payment_type,payment_date,update_time,del_status)'
    );
    /**挂账记录表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_credit_record ' +
        '(id,shop_id,card_id,customer_shop_id,owing_value,create_date,repayed_value,repay_record_id,update_time,del_status)'
    );
    /**还账记录表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_repay_record ' +
        '(id,card_id,shop_id,customer_shop_id,repay_value,repay_type,repay_date,update_time,del_status)'
    );
    /**其他财务收支记录表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_extra_financial_record ' +
        '(id,shop_id,pay_value,earning_value,remark,create_time,update_time,del_status)'
    );
    /**订单表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_appointment ' +
        '(id,shop_id,update_time,plat,appoint_time,del_status,items_id,total_fee)');
    /**单项预约表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_appointment_item ' +
        '(id,comment_id,cost_time,customer_id,del_status,hairdresser_id,pay_status,hairshop_id,plat,' +
        'price,product_id,product_name,start_time,status,update_time)');
    /**评论表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_comment ' +
        '(id, commenter_id, commenter_type,content,del_status,score,update_time)');
    /**店会员表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_shop ' +
        '(id, cellphone,name,shop_id,credit,last_access_time,last_product_name,last_product_id,' +
        'register_date,remind_time,remind_status,appointment_count,comment_id,gender,' +
        'age,birthday,update_time,del_status,recommend_customer_id,card_id,package_ids,credit_line)');
    /**微信会员表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_wechat (id,age,appointment_count,birthday,cellphone,' +
        'continuous_sign_times,credit,del_status,first_attention_time,gender,last_interview_mills,' +
        'last_sign_date,name,open_id,pay_attention,shop_id,update_time,head_img_url)');
    /**会员备注信息表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_comment ' +
        '(id, comment_by, content,del_status, update_time)');
    /**店-微信会员关联表 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_shop_to_wechat ' +
        '(id, customer_shop_id, customer_wechat_id,shop_id, open_id, update_time)');
    /**会员套餐 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_package (id,shop_id,name,price,available_balance,' +
        'item_ids,start_time,end_time,update_time,del_status,model_id,customer_shop_id)');
    /**会员套餐项 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_customer_package_item (id,shop_id,description,product_id,' +
        'type,times,conversion_price,discount_rate,update_time,del_status)');
    /**套餐变更记录 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_change_record (id,shop_id,customer_name,customer_card,' +
        'customer_cellphone,primary_package_name,primary_package_id,primary_available_balance,new_package_name,' +
        'new_package_id,new_available_balance,remark,update_time,del_status)');
    /**套餐取现记录 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_enchashment_record (id,shop_id,customer_name,customer_card,' +
        'customer_cellphone,package_name,package_id,available_balance,enchash_value,update_time,del_status,remark)');
    /**套餐冻结记录 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_freeze_record (id,shop_id,customer_name,customer_card,' +
        'customer_cellphone,package_name,package_id,available_balance,freeze_date,unfreeze_date,freeze_status,' +
        'remark,update_time,del_status )');
    /**套餐模版 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_model (id,shop_id,name,price,available_balance,item_ids,' +
        'start_time,end_time,update_time,del_status)');
    /**套餐项模版 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_model_item (id,shop_id,description,product_id,type,times,' +
        'conversion_price,discount_rate,update_time,del_status)');
    /**套餐转让记录 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_package_transfer_record (id,shop_id,primary_customer_name,' +
        'primary_customer_card,primary_customer_cellphone,package_name,package_id,available_balance,' +
        'new_customer_name,new_customer_card,new_customer_cellphone,update_time,del_status,remark)');

    /**美发师 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_hairdresser ' +
        '(id, del_status,dresser_intro,dresser_tel,examine_status,hairshop_id,media_id,name,' +
        'position,sort, update_time,work_experience_id,work_id)');
    /**works */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_works ' +
        '(id, del_status, description,media_id,name, update_time)');
    /**工作经验 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_work_experience ' +
        '(id, content,del_status,end_time,start_time, update_time)');
    /**media */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_multimedia ' +
        '(id, base_code,base_media,del_status,media_type,shrink_code,shrink_media, update_time)');
    /**美发店 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_hairshop ' +
        '(id, address,area,close_time,del_status,examine_status,hot,introduction,keeper_tel,' +
        'latitude,longitude,media_ids,multiple,multiple_id,name,open_time,shop_keeper,shop_tel,' +
        'shop_wechar_id, update_time)');
    /**产品 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_product ' +
        '(id, del_status,description,examine_status,hairshop_id,horizontal_media_id,name,price,' +
        'remind_circle,sort,time,type,update_time,vertical_media_id)');
    /**美发师与产品关联 */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_hairdresser_product ' +
        '(id, del_status,hairdresser_id, product_id, update_time)');
    /**schedule */
    tx.executeSql('CREATE TABLE IF NOT EXISTS t_schedule ' +
        '(id, date,del_status,hairdresser_id, shop_id, update_time,work_status)');

    // 员工
    var createsqlEmployee = "CREATE TABLE IF NOT EXISTS t_employee (";
    createsqlEmployee += "  id ,                ";
    createsqlEmployee += "  number ,             ";
    createsqlEmployee += "  shop_id ,            ";
    createsqlEmployee += "  name,                ";
    createsqlEmployee += "  position_id ,        ";
    createsqlEmployee += "  linked_id,           ";
    createsqlEmployee += "  gender,              ";
    createsqlEmployee += "  birthday,            ";
    createsqlEmployee += "  education ,          ";
    createsqlEmployee += "  entry_time ,         ";
    createsqlEmployee += "  cellphone ,          ";
    createsqlEmployee += "  identity_card ,      ";
    createsqlEmployee += "  address,             ";
    createsqlEmployee += "  update_time,         ";
    createsqlEmployee += "  del_status)";
    tx.executeSql(createsqlEmployee);

    // 职位
    var createsqlPosition = "CREATE TABLE IF NOT EXISTS t_employee_position (";
    createsqlPosition += "  id ,                ";
    createsqlPosition += "  shop_id,             ";
    createsqlPosition += "  number,              ";
    createsqlPosition += "  position_name,       ";
    createsqlPosition += "  remark ,             ";
    createsqlPosition += "  update_time,         ";
    createsqlPosition += "  del_status)";
    tx.executeSql(createsqlPosition);

    // 发放明细
    var createsqlsalary_record = "CREATE TABLE IF NOT EXISTS t_salary_record (";
    createsqlsalary_record += "id,";
    createsqlsalary_record += "shop_id,";
    createsqlsalary_record += "employee_id,";
    createsqlsalary_record += "employee_name,";
    createsqlsalary_record += "base_salary,";
    createsqlsalary_record += "card_sale_bonus,";
    createsqlsalary_record += "service_bonus,";
    createsqlsalary_record += "product_bonus,";
    createsqlsalary_record += "subsidy,";
    createsqlsalary_record += "reward,";
    createsqlsalary_record += "daily_reward,";
    createsqlsalary_record += "deduct_value,";
    createsqlsalary_record += "endowment_insurance,";
    createsqlsalary_record += "public_accumulation_funds,";
    createsqlsalary_record += "gross_salary,";
    createsqlsalary_record += "income_tax,";
    createsqlsalary_record += "net_salary,";
    createsqlsalary_record += "provide_status,";
    createsqlsalary_record += "remark,";
    createsqlsalary_record += "salary_date,";
    createsqlsalary_record += "update_time,";
    createsqlsalary_record += "del_status)";
    tx.executeSql(createsqlsalary_record);

    // 员工请假记录表
    var createsql_leave = "CREATE TABLE IF NOT EXISTS t_leave (id, shop_id, employee_number, employee_name, start_time, end_time, remark, update_time, del_status);";
    tx.executeSql(createsql_leave);

    // 提成方式设置表
    var createsql_deduct = "CREATE TABLE IF NOT EXISTS t_deduct_setting (id, shop_id, service_deduct_type, recharge_deduct_type, sales_deduct_type, update_time, del_status);";
    tx.executeSql(createsql_deduct);

    // 提成方式1设定表
    var createsql_deduct_type1 = "CREATE TABLE IF NOT EXISTS t_deduct_type1_setting (id, shop_id, setting_for, position_number, object_id, first_type, appointed_first_rate, inturn_first_rate,";
    createsql_deduct_type1 += "second_type, appointed_second_rate, inturn_second_rate, third_type, appointed_third_rate, inturn_third_rate, update_time, del_status);";
    tx.executeSql(createsql_deduct_type1);

    // 提成方式2设定表
    var createsql_deduct_type2 = "CREATE TABLE IF NOT EXISTS t_deduct_type2_setting (id,shop_id,setting_for,object_id,lower_value,upper_value,first_deduct_rate,first_calculate_type,";
    createsql_deduct_type2 += "second_deduct_rate,second_calculate_type,third_deduct_rate,third_calculate_type,update_time,del_status);";
    tx.executeSql(createsql_deduct_type2);

    // 提成方式3设定表
    var createsql_deduct_type3 = "CREATE TABLE IF NOT EXISTS t_deduct_type3_setting (id, shop_id, setting_for, object_id, first_calculate_type, first_deduct_rate, first_inturn_rate,";
    createsql_deduct_type3 += "second_calculate_type, second_deduct_rate, second_inturn_rate, third_calculate_type, third_deduct_rate, third_inturn_rate, update_time, del_status);";
    tx.executeSql(createsql_deduct_type3);

    var createsql_t_authority_e = "CREATE TABLE IF NOT EXISTS t_authority_e (";
    createsql_t_authority_e += "id,";
    createsql_t_authority_e += "shop_id,";
    createsql_t_authority_e += "module_name,";
    createsql_t_authority_e += "setting,";
    createsql_t_authority_e += "update_time,";
    createsql_t_authority_e += "del_status)";
    tx.executeSql(createsql_t_authority_e);

    var createsql_t_position_authority = "CREATE TABLE IF NOT EXISTS t_position_authority (";
    createsql_t_position_authority += "id,";
    createsql_t_position_authority += "shop_id,";
    createsql_t_position_authority += "position_id,";
    createsql_t_position_authority += "authority_e_id,";
    createsql_t_position_authority += "update_time,";
    createsql_t_position_authority += "del_status)";
    tx.executeSql(createsql_t_position_authority);

    var createsqlsalary_setting = "CREATE TABLE t_salary_setting (";
    createsqlsalary_setting += "id,";
    createsqlsalary_setting += "shop_id,";
    createsqlsalary_setting += "position_number,";
    createsqlsalary_setting += "position_name,";
    createsqlsalary_setting += "base_salary,";
    createsqlsalary_setting += "base_salary_mode,";
    createsqlsalary_setting += "card_sale_bonus,";
    createsqlsalary_setting += "service_bonus,";
    createsqlsalary_setting += "product_bonus,";
    createsqlsalary_setting += "subsidy,";
    createsqlsalary_setting += "subsidy_mode,";
    createsqlsalary_setting += "reward,";
    createsqlsalary_setting += "daily_reward,";
    createsqlsalary_setting += "deduct_value,";
    createsqlsalary_setting += "public_accumulation_funds,";
    createsqlsalary_setting += "endowment_insurance,";
    createsqlsalary_setting += "gross_salary,";
    createsqlsalary_setting += "income_tax,";
    createsqlsalary_setting += "net_salary,";
    createsqlsalary_setting += "remark,";
    createsqlsalary_setting += "update_time,";
    createsqlsalary_setting += "del_status)";
    tx.executeSql(createsqlsalary_setting);
}